package com.southwind.entity.factory;

import java.util.HashMap;
import java.util.Map;

import com.southwind.entity.Car;

public class InstanceCarFactory {
	
	private Map<Long, Car> carMap;
	
public InstanceCarFactory() {
	carMap = new HashMap<Long, Car>();
	carMap.put(1L, new Car(1L,"宝马"));
	carMap.put(2L, new Car(2L,"奔驰"));
}

public Car getCar(long id) {
	return carMap.get(id);
}

}
